package com.cars.springbootbeetlsql.service.impl;

import com.cars.springbootbeetlsql.dao.db1.User1Mapper;
import com.cars.springbootbeetlsql.entity.User1Entity;
import com.cars.springbootbeetlsql.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: UserServiceImpl
 * @Description: 用户接口实现
 * @author: caoqianfan
 * @date: 2023/8/22 14:12
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private User1Mapper user1Mapper;

    @Override
    public void insert(User1Entity entity) {
        user1Mapper.insert(entity);
    }

    @Override
    public Integer deleteById(Integer id) {
        return user1Mapper.deleteById(id);
    }

    @Override
    public Integer updateById(User1Entity entity) {
        return user1Mapper.updateById(entity);
    }

    @Override
    public List<User1Entity> selectByIds(List<Integer> id) {
        return user1Mapper.selectByIds(id);
    }

    @Override
    public List<User1Entity> all() {
        return user1Mapper.all();
    }

    @Override
    public Long allCount() {
        return user1Mapper.allCount();
    }
}
